package com.iknow.xmpp.service.aidl;

import android.os.Binder;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
import android.os.Parcelable.Creator;
import android.os.RemoteException;
import com.iknow.xmpp.service.Contact;
import com.iknow.xmpp.service.Message;
import java.util.ArrayList;
import java.util.List;

public abstract interface IChat
  implements IInterface
{
  public abstract void addMessageListener(IMessageListener paramIMessageListener)
    throws RemoteException;

  public abstract List<Message> getMessages()
    throws RemoteException;

  public abstract Contact getParticipant()
    throws RemoteException;

  public abstract String getState()
    throws RemoteException;

  public abstract boolean isOpen()
    throws RemoteException;

  public abstract void removeMessageListener(IMessageListener paramIMessageListener)
    throws RemoteException;

  public abstract void sendMessage(Message paramMessage)
    throws RemoteException;

  public abstract void setOpen(boolean paramBoolean)
    throws RemoteException;

  public abstract void setState(String paramString)
    throws RemoteException;

  public static abstract class Stub extends Binder
  implements IChat
  {
    private static final String DESCRIPTOR = "com.iknow.xmpp.service.aidl.IChat";
    static final int TRANSACTION_addMessageListener = 3;
    static final int TRANSACTION_getMessages = 9;
    static final int TRANSACTION_getParticipant = 2;
    static final int TRANSACTION_getState = 5;
    static final int TRANSACTION_isOpen = 7;
    static final int TRANSACTION_removeMessageListener = 4;
    static final int TRANSACTION_sendMessage = 1;
    static final int TRANSACTION_setOpen = 6;
    static final int TRANSACTION_setState = 8;

    public Stub()
    {
      attachInterface(this, "com.iknow.xmpp.service.aidl.IChat");
    }

    public static IChat asInterface(IBinder paramIBinder)
    {
      Object localObject;
      if (paramIBinder == null)
        localObject = null;
      while (true)
      {
        while (true)
        {
          return localObject;
          IInterface localIInterface = paramIBinder.queryLocalInterface("com.iknow.xmpp.service.aidl.IChat");
          if ((localIInterface == null) || (!(localIInterface instanceof IChat)))
            break;
          localObject = (IChat)localIInterface;
        }
        localObject = new Proxy(paramIBinder);
      }
    }

    public IBinder asBinder()
    {
      return this;
    }

    public boolean onTransact(int paramInt1, Parcel paramParcel1, Parcel paramParcel2, int paramInt2)
      throws RemoteException
    {
      boolean bool1;
      switch (paramInt1)
      {
      default:
        bool1 = super.onTransact(paramInt1, paramParcel1, paramParcel2, paramInt2);
      case 1598968902:
      case 1:
      case 2:
      case 3:
      case 4:
      case 5:
      case 6:
      case 7:
      case 8:
      case 9:
      }
      while (true)
      {
        while (true)
        {
          int i;
          boolean bool3;
          while (true)
          {
            while (true)
            {
              while (true)
              {
                Message localMessage;
                while (true)
                {
                  return bool1;
                  paramParcel2.writeString("com.iknow.xmpp.service.aidl.IChat");
                  bool1 = true;
                }
                paramParcel1.enforceInterface("com.iknow.xmpp.service.aidl.IChat");
                if (paramParcel1.readInt() != 0)
                  localMessage = (Message)Message.CREATOR.createFromParcel(paramParcel1);
                while (true)
                {
                  while (true)
                  {
                    sendMessage(localMessage);
                    paramParcel2.writeNoException();
                    bool1 = true;
                  }
                  localMessage = null;
                }
                paramParcel1.enforceInterface("com.iknow.xmpp.service.aidl.IChat");
                Contact localContact = getParticipant();
                paramParcel2.writeNoException();
                if (localContact != null)
                {
                  paramParcel2.writeInt(1);
                  localContact.writeToParcel(paramParcel2, 1);
                }
                while (true)
                {
                  while (true)
                    bool1 = true;
                  paramParcel2.writeInt(0);
                }
                paramParcel1.enforceInterface("com.iknow.xmpp.service.aidl.IChat");
                addMessageListener(IMessageListener.Stub.asInterface(paramParcel1.readStrongBinder()));
                paramParcel2.writeNoException();
                bool1 = true;
              }
              paramParcel1.enforceInterface("com.iknow.xmpp.service.aidl.IChat");
              removeMessageListener(IMessageListener.Stub.asInterface(paramParcel1.readStrongBinder()));
              paramParcel2.writeNoException();
              bool1 = true;
            }
            paramParcel1.enforceInterface("com.iknow.xmpp.service.aidl.IChat");
            String str = getState();
            paramParcel2.writeNoException();
            paramParcel2.writeString(str);
            bool1 = true;
          }
          paramParcel1.enforceInterface("com.iknow.xmpp.service.aidl.IChat");
          if (paramParcel1.readInt() != 0)
            bool3 = true;
          while (true)
          {
            while (true)
            {
              setOpen(bool3);
              paramParcel2.writeNoException();
              bool1 = true;
            }
            bool3 = false;
          }
          paramParcel1.enforceInterface("com.iknow.xmpp.service.aidl.IChat");
          boolean bool2 = isOpen();
          paramParcel2.writeNoException();
          if (bool2)
            i = 1;
          while (true)
          {
            while (true)
            {
              paramParcel2.writeInt(i);
              bool1 = true;
            }
            i = 0;
          }
          paramParcel1.enforceInterface("com.iknow.xmpp.service.aidl.IChat");
          setState(paramParcel1.readString());
          paramParcel2.writeNoException();
          bool1 = true;
        }
        paramParcel1.enforceInterface("com.iknow.xmpp.service.aidl.IChat");
        List localList = getMessages();
        paramParcel2.writeNoException();
        paramParcel2.writeTypedList(localList);
        bool1 = true;
      }
    }

    private static class Proxy
  implements IChat
    {
      private IBinder mRemote;

      Proxy(IBinder paramIBinder)
      {
        this.mRemote = paramIBinder;
      }

      // ERROR //
      public void addMessageListener(IMessageListener paramIMessageListener)
        throws RemoteException
      {
        // Byte code:
        //   0: invokestatic 28	android/os/Parcel:obtain	()Landroid/os/Parcel;
        //   3: astore_2
        //   4: invokestatic 28	android/os/Parcel:obtain	()Landroid/os/Parcel;
        //   7: astore_3
        //   8: aload_2
        //   9: ldc 30
        //   11: invokevirtual 34	android/os/Parcel:writeInterfaceToken	(Ljava/lang/String;)V
        //   14: aload_1
        //   15: ifnull +44 -> 59
        //   18: aload_1
        //   19: invokeinterface 40 1 0
        //   24: astore 5
        //   26: aload_2
        //   27: aload 5
        //   29: invokevirtual 43	android/os/Parcel:writeStrongBinder	(Landroid/os/IBinder;)V
        //   32: aload_0
        //   33: getfield 18	com/iknow/xmpp/service/aidl/IChat$Stub$Proxy:mRemote	Landroid/os/IBinder;
        //   36: iconst_3
        //   37: aload_2
        //   38: aload_3
        //   39: iconst_0
        //   40: invokeinterface 49 5 0
        //   45: pop
        //   46: aload_3
        //   47: invokevirtual 52	android/os/Parcel:readException	()V
        //   50: aload_3
        //   51: invokevirtual 55	android/os/Parcel:recycle	()V
        //   54: aload_2
        //   55: invokevirtual 55	android/os/Parcel:recycle	()V
        //   58: return
        //   59: aconst_null
        //   60: astore 5
        //   62: goto -36 -> 26
        //   65: astore 4
        //   67: aload_3
        //   68: invokevirtual 55	android/os/Parcel:recycle	()V
        //   71: aload_2
        //   72: invokevirtual 55	android/os/Parcel:recycle	()V
        //   75: aload 4
        //   77: athrow
        //
        // Exception table:
        //   from	to	target	type
        //   8	50	65	finally
      }

      public IBinder asBinder()
      {
        return this.mRemote;
      }

      public String getInterfaceDescriptor()
      {
        return "com.iknow.xmpp.service.aidl.IChat";
      }

      public List<Message> getMessages()
        throws RemoteException
      {
        Parcel localParcel1 = Parcel.obtain();
        Parcel localParcel2 = Parcel.obtain();
        try
        {
          localParcel1.writeInterfaceToken("com.iknow.xmpp.service.aidl.IChat");
          this.mRemote.transact(9, localParcel1, localParcel2, 0);
          localParcel2.readException();
          ArrayList localArrayList = localParcel2.createTypedArrayList(Message.CREATOR);
          return localArrayList;
        }
        finally
        {
          localParcel2.recycle();
          localParcel1.recycle();
        }
      }

      // ERROR //
      public Contact getParticipant()
        throws RemoteException
      {
        // Byte code:
        //   0: invokestatic 28	android/os/Parcel:obtain	()Landroid/os/Parcel;
        //   3: astore_1
        //   4: invokestatic 28	android/os/Parcel:obtain	()Landroid/os/Parcel;
        //   7: astore_2
        //   8: aload_1
        //   9: ldc 30
        //   11: invokevirtual 34	android/os/Parcel:writeInterfaceToken	(Ljava/lang/String;)V
        //   14: aload_0
        //   15: getfield 18	com/iknow/xmpp/service/aidl/IChat$Stub$Proxy:mRemote	Landroid/os/IBinder;
        //   18: iconst_2
        //   19: aload_1
        //   20: aload_2
        //   21: iconst_0
        //   22: invokeinterface 49 5 0
        //   27: pop
        //   28: aload_2
        //   29: invokevirtual 52	android/os/Parcel:readException	()V
        //   32: aload_2
        //   33: invokevirtual 75	android/os/Parcel:readInt	()I
        //   36: ifeq +28 -> 64
        //   39: getstatic 78	com/iknow/xmpp/service/Contact:CREATOR	Landroid/os/Parcelable$Creator;
        //   42: aload_2
        //   43: invokeinterface 84 2 0
        //   48: checkcast 77	com/iknow/xmpp/service/Contact
        //   51: astore 5
        //   53: aload_2
        //   54: invokevirtual 55	android/os/Parcel:recycle	()V
        //   57: aload_1
        //   58: invokevirtual 55	android/os/Parcel:recycle	()V
        //   61: aload 5
        //   63: areturn
        //   64: aconst_null
        //   65: astore 5
        //   67: goto -14 -> 53
        //   70: astore_3
        //   71: aload_2
        //   72: invokevirtual 55	android/os/Parcel:recycle	()V
        //   75: aload_1
        //   76: invokevirtual 55	android/os/Parcel:recycle	()V
        //   79: aload_3
        //   80: athrow
        //
        // Exception table:
        //   from	to	target	type
        //   8	53	70	finally
      }

      public String getState()
        throws RemoteException
      {
        Parcel localParcel1 = Parcel.obtain();
        Parcel localParcel2 = Parcel.obtain();
        try
        {
          localParcel1.writeInterfaceToken("com.iknow.xmpp.service.aidl.IChat");
          this.mRemote.transact(5, localParcel1, localParcel2, 0);
          localParcel2.readException();
          String str = localParcel2.readString();
          return str;
        }
        finally
        {
          localParcel2.recycle();
          localParcel1.recycle();
        }
      }

      // ERROR //
      public boolean isOpen()
        throws RemoteException
      {
        // Byte code:
        //   0: invokestatic 28	android/os/Parcel:obtain	()Landroid/os/Parcel;
        //   3: astore_1
        //   4: invokestatic 28	android/os/Parcel:obtain	()Landroid/os/Parcel;
        //   7: astore_2
        //   8: aload_1
        //   9: ldc 30
        //   11: invokevirtual 34	android/os/Parcel:writeInterfaceToken	(Ljava/lang/String;)V
        //   14: aload_0
        //   15: getfield 18	com/iknow/xmpp/service/aidl/IChat$Stub$Proxy:mRemote	Landroid/os/IBinder;
        //   18: bipush 7
        //   20: aload_1
        //   21: aload_2
        //   22: iconst_0
        //   23: invokeinterface 49 5 0
        //   28: pop
        //   29: aload_2
        //   30: invokevirtual 52	android/os/Parcel:readException	()V
        //   33: aload_2
        //   34: invokevirtual 75	android/os/Parcel:readInt	()I
        //   37: istore 5
        //   39: iload 5
        //   41: ifeq +17 -> 58
        //   44: iconst_1
        //   45: istore 6
        //   47: aload_2
        //   48: invokevirtual 55	android/os/Parcel:recycle	()V
        //   51: aload_1
        //   52: invokevirtual 55	android/os/Parcel:recycle	()V
        //   55: iload 6
        //   57: ireturn
        //   58: iconst_0
        //   59: istore 6
        //   61: goto -14 -> 47
        //   64: astore_3
        //   65: aload_2
        //   66: invokevirtual 55	android/os/Parcel:recycle	()V
        //   69: aload_1
        //   70: invokevirtual 55	android/os/Parcel:recycle	()V
        //   73: aload_3
        //   74: athrow
        //
        // Exception table:
        //   from	to	target	type
        //   8	39	64	finally
      }

      // ERROR //
      public void removeMessageListener(IMessageListener paramIMessageListener)
        throws RemoteException
      {
        // Byte code:
        //   0: invokestatic 28	android/os/Parcel:obtain	()Landroid/os/Parcel;
        //   3: astore_2
        //   4: invokestatic 28	android/os/Parcel:obtain	()Landroid/os/Parcel;
        //   7: astore_3
        //   8: aload_2
        //   9: ldc 30
        //   11: invokevirtual 34	android/os/Parcel:writeInterfaceToken	(Ljava/lang/String;)V
        //   14: aload_1
        //   15: ifnull +44 -> 59
        //   18: aload_1
        //   19: invokeinterface 40 1 0
        //   24: astore 5
        //   26: aload_2
        //   27: aload 5
        //   29: invokevirtual 43	android/os/Parcel:writeStrongBinder	(Landroid/os/IBinder;)V
        //   32: aload_0
        //   33: getfield 18	com/iknow/xmpp/service/aidl/IChat$Stub$Proxy:mRemote	Landroid/os/IBinder;
        //   36: iconst_4
        //   37: aload_2
        //   38: aload_3
        //   39: iconst_0
        //   40: invokeinterface 49 5 0
        //   45: pop
        //   46: aload_3
        //   47: invokevirtual 52	android/os/Parcel:readException	()V
        //   50: aload_3
        //   51: invokevirtual 55	android/os/Parcel:recycle	()V
        //   54: aload_2
        //   55: invokevirtual 55	android/os/Parcel:recycle	()V
        //   58: return
        //   59: aconst_null
        //   60: astore 5
        //   62: goto -36 -> 26
        //   65: astore 4
        //   67: aload_3
        //   68: invokevirtual 55	android/os/Parcel:recycle	()V
        //   71: aload_2
        //   72: invokevirtual 55	android/os/Parcel:recycle	()V
        //   75: aload 4
        //   77: athrow
        //
        // Exception table:
        //   from	to	target	type
        //   8	50	65	finally
      }

      public void sendMessage(Message paramMessage)
        throws RemoteException
      {
        Parcel localParcel1 = Parcel.obtain();
        Parcel localParcel2 = Parcel.obtain();
        try
        {
          localParcel1.writeInterfaceToken("com.iknow.xmpp.service.aidl.IChat");
          if (paramMessage != null)
          {
            localParcel1.writeInt(1);
            paramMessage.writeToParcel(localParcel1, 0);
            this.mRemote.transact(1, localParcel1, localParcel2, 0);
            localParcel2.readException();
            localParcel2.recycle();
            localParcel1.recycle();
          }
        }
        finally
        {
          localParcel2.recycle();
          localParcel1.recycle();
        }
      }

      // ERROR //
      public void setOpen(boolean paramBoolean)
        throws RemoteException
      {
        // Byte code:
        //   0: invokestatic 28	android/os/Parcel:obtain	()Landroid/os/Parcel;
        //   3: astore_2
        //   4: invokestatic 28	android/os/Parcel:obtain	()Landroid/os/Parcel;
        //   7: astore_3
        //   8: aload_2
        //   9: ldc 30
        //   11: invokevirtual 34	android/os/Parcel:writeInterfaceToken	(Ljava/lang/String;)V
        //   14: iload_1
        //   15: ifeq +40 -> 55
        //   18: iconst_1
        //   19: istore 5
        //   21: aload_2
        //   22: iload 5
        //   24: invokevirtual 97	android/os/Parcel:writeInt	(I)V
        //   27: aload_0
        //   28: getfield 18	com/iknow/xmpp/service/aidl/IChat$Stub$Proxy:mRemote	Landroid/os/IBinder;
        //   31: bipush 6
        //   33: aload_2
        //   34: aload_3
        //   35: iconst_0
        //   36: invokeinterface 49 5 0
        //   41: pop
        //   42: aload_3
        //   43: invokevirtual 52	android/os/Parcel:readException	()V
        //   46: aload_3
        //   47: invokevirtual 55	android/os/Parcel:recycle	()V
        //   50: aload_2
        //   51: invokevirtual 55	android/os/Parcel:recycle	()V
        //   54: return
        //   55: iconst_0
        //   56: istore 5
        //   58: goto -37 -> 21
        //   61: astore 4
        //   63: aload_3
        //   64: invokevirtual 55	android/os/Parcel:recycle	()V
        //   67: aload_2
        //   68: invokevirtual 55	android/os/Parcel:recycle	()V
        //   71: aload 4
        //   73: athrow
        //
        // Exception table:
        //   from	to	target	type
        //   8	46	61	finally
      }

      public void setState(String paramString)
        throws RemoteException
      {
        Parcel localParcel1 = Parcel.obtain();
        Parcel localParcel2 = Parcel.obtain();
        try
        {
          localParcel1.writeInterfaceToken("com.iknow.xmpp.service.aidl.IChat");
          localParcel1.writeString(paramString);
          this.mRemote.transact(8, localParcel1, localParcel2, 0);
          localParcel2.readException();
          return;
        }
        finally
        {
          localParcel2.recycle();
          localParcel1.recycle();
        }
      }
    }
  }
}